package com.sw.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.sw.dao.CompanyDao;
import com.sw.model.Company;
import com.sw.service.CompanyService;

@Service
public class CompanyServiceImpl implements CompanyService {

	@Autowired
	private CompanyDao companyDao;
	
	@Override
	public List<Company> getCompanyAll() {
		
		return companyDao.getCompanyAll();
	}

	@Override
	public boolean insertCompany(Company company) {
		int i = companyDao.insertCompany(company);
		if(i==1){
			return true;
		}
		return false;
	}

}
